package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CoTestMenuMapper;
import com.ruoyi.system.domain.CoTestMenu;
import com.ruoyi.system.service.ICoTestMenuService;
import com.ruoyi.common.core.text.Convert;

/**
 * 菜单管理Service业务层处理
 * 
 * @author 冬木逢春
 * @date 2022-06-19
 */
@Service
public class CoTestMenuServiceImpl implements ICoTestMenuService 
{
    @Autowired
    private CoTestMenuMapper coTestMenuMapper;

    /**
     * 查询菜单管理
     * 
     * @param menuId 菜单管理主键
     * @return 菜单管理
     */
    @Override
    public CoTestMenu selectCoTestMenuByMenuId(Long menuId)
    {
        return coTestMenuMapper.selectCoTestMenuByMenuId(menuId);
    }

    /**
     * 查询菜单管理列表
     * 
     * @param coTestMenu 菜单管理
     * @return 菜单管理
     */
    @Override
    public List<CoTestMenu> selectCoTestMenuList(CoTestMenu coTestMenu)
    {
        return coTestMenuMapper.selectCoTestMenuList(coTestMenu);
    }

    /**
     * 新增菜单管理
     * 
     * @param coTestMenu 菜单管理
     * @return 结果
     */
    @Override
    public int insertCoTestMenu(CoTestMenu coTestMenu)
    {
        return coTestMenuMapper.insertCoTestMenu(coTestMenu);
    }

    /**
     * 修改菜单管理
     * 
     * @param coTestMenu 菜单管理
     * @return 结果
     */
    @Override
    public int updateCoTestMenu(CoTestMenu coTestMenu)
    {
        return coTestMenuMapper.updateCoTestMenu(coTestMenu);
    }

    /**
     * 批量删除菜单管理
     * 
     * @param menuIds 需要删除的菜单管理主键
     * @return 结果
     */
    @Override
    public int deleteCoTestMenuByMenuIds(String menuIds)
    {
        return coTestMenuMapper.deleteCoTestMenuByMenuIds(Convert.toStrArray(menuIds));
    }

    /**
     * 删除菜单管理信息
     * 
     * @param menuId 菜单管理主键
     * @return 结果
     */
    @Override
    public int deleteCoTestMenuByMenuId(Long menuId)
    {
        return coTestMenuMapper.deleteCoTestMenuByMenuId(menuId);
    }
}
